import java.awt.Color;
import java.util.ArrayList;
import java.util.Random;


public class DotGenerator 
{
	private ArrayList<Dot> dots;
	private int xdem;
	private int ydem;
	private Random generator;
	private Color[] colors = new Color[]{Color.RED,Color.BLUE,Color.CYAN,Color.GRAY,Color.GREEN,Color.MAGENTA,Color.ORANGE,Color.PINK};
	
	public DotGenerator(int x, int y)
	{
		xdem=x;
		ydem=y;
		generator = new Random();
		dots = new ArrayList();
	}
	
	public void generateDot()
	{
		Color co=colors[generator.nextInt(colors.length)];
		int x=generator.nextInt(xdem);
		int y=generator.nextInt(ydem);
		int ra=generator.nextInt(70)+30;
		Dot d = new Dot(co,ra,x,y);
		dots.add(d);
		
	}
	
	public ArrayList<Dot> gDots()
	{
		return dots;
	}
	
	public void setSize(int x, int y)
	{
		xdem=x;
		ydem=y;
	}
}
